package com.zlp.mall.modules.cms.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zlp.mall.common.util.BeanToUtils;
import com.zlp.mall.modules.cms.dto.resp.PrefrenceAreaResp;
import com.zlp.mall.modules.cms.mapper.PrefrenceAreaMapper;
import com.zlp.mall.modules.cms.model.PrefrenceArea;
import com.zlp.mall.modules.cms.service.PrefrenceAreaService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 优选专区 服务实现类
 * </p>
 *
 * @author ZouLiPing
 * @since 2021-10-08
 */
@Service
@Slf4j(topic = "PrefrenceAreaServiceImpl")
public class PrefrenceAreaServiceImpl extends ServiceImpl<PrefrenceAreaMapper, PrefrenceArea> implements PrefrenceAreaService {

    @Override
    public List<PrefrenceAreaResp> listAll() {

        log.info("listAll");
        List<PrefrenceArea> list = this.list();
        return BeanToUtils.entityToList(list, PrefrenceAreaResp.class);
    }
}
